def message(code, argv):
    argv.extend([' ', ' ', ' ', ' ', ' ', ' '])
    mesg =  'Spass : '
    res = {
        'custom' : str(argv[0]),
        'successfully.added' : str(argv[0]+ " has been successfully added"),
        'successfully.removed' : str(argv[0]+" has been successfully removed"),
        'successfully.added.to' : str(argv[0]+" has been successfully added to "
                                      +argv[1]),
        'successfully.removed.from' : str(argv[0]+" has been successfully "\
                                              "removed from "+argv[1]),
        'atest.ls': str('Tests of the assignment [' + argv[0] + '] :'),
        'av.new' : str('New version [' + argv[2] + '] for the team '\
                           '[' + argv[1] + '] in the assignment '\
                           '[' + argv[0] + ']'),
        'av.ls' : str('Versions of assignment [' + argv[0] + '] team '\
                          '[' + argv[1] + '] :'),
        'avf.ls' : str('Files of assignment [' + argv[0] + '] team '\
                           '[' + argv[1] + '] version [' + argv[2] + '] :'),
        'avt.ls' : str('Tests of assignment [' + argv[0] + '] team '\
                           '[' + argv[1] + '] version [' + argv[2] + '] :'),     
        'user.found' : str("User"+" "+argv[0]+" found."),
        'team.found' : str("Team "+argv[0]+" found."),
        'teamset.found' : str("Teamset "+argv[0]+" found."),
        'nb.users.found' : str(argv[0]+" user(s) found."),
        'not.any.user' : str("Not any user in the database."),
        'not.any.teams' : str("Not any teams in the database."),
        'not.any.teamset' : str("Not any team set in the database."),
        'not.any.template' : str("Not any template in the database."),
        'not.any.assignment' : str("Not any assignment in the database."),
        'team.tag' : str("Team(s)' id :"),
        'teamset.tag' : str ("Team set(s)' id:"),
        'assignment.tag' : str("Assignment(s) :"),
        'user.infos.recap' : str(argv[0]+" "+argv[1]+" belongs to "+argv[2]+\
                                     "team(s) and "+argv[3]+" assignment(s)"),
        'team.infos.recap' : str("Team "+argv[0]+" belongs to "+argv[1]+
                                 " teamset(s) and "+argv[2]+" assignment(s)"),
        'teamset.infos.recap' : str("Teamset "+argv[0]+" belongs to "
                                    +argv[1]+" assignment(s)"),
        'user.identity' : str("Id : "+argv[0]+" \tFullname : "+argv[1]+
                              " \tName : "+argv[2]),
        'template.identity' : str("Id : "+argv[0]+" \tTitle : "+argv[1]),
        'infos.details' : str("Id : "+argv[0]+" \tTemplate'id : "+argv[1]+
                              " \tDate : "+argv[2]+" \tTeamSet's id : "
                              +argv[3]+" \tSupervisor's id : "+argv[4]),
        }
    mesg += res.get(code)
    print mesg

